1. /* slflpw10.cpp by K.Tsuru */
  2. // function ID = 223 DRADIX
  3. /********************************************
  4. SLong class
  5. It provides a number of power of ten 10^n.
  6. When n < 0 it returns zero.
  7. ********************************************/
  8. #ifndef SN_H
  9. #include "sn.h"
  10. #endif
  11. SLong Lpow10(long n){
  12. if(n < 0) return 0.0;
  13. long q = n/DFIGURES, r = n%DFIGURES;
  14. long max_sz = (long)SNManager::SNMaxSize(SNManager::DEC_INT);
  15. if(q >= max_sz) SNManager::SetError(SNManager::OVERFLOW_ERR, "LPow10", 223);
  16. fType t = 1u;
  17. while(r--) t *= 10u;
  18. SLong x(t);
  19. x.MultPowRdx(q); // x *= R^q version 2.20
  20. // x.SetSign(1); x.figure[(uint)q] = t;
  21. // x.aHead = x.aTail = (uint)q;
  22. return x;
  23. }

slflpw10.cpp : last modifiled at 2017/03/17 11:10:48(709 bytes)
created at 2017/10/07 10:26:49
The creation time of this html file is 2017/11/09 14:52:03 (Thu Nov 09 14:52:03 2017).